import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';
import get_roles from '@feidao/web/atom/nodejs/authorization/get-roles';
import render from '@feidao/web/atom/nodejs/render/render';
import P01 from './P01';

export default async function na001(fd: IFeidaoAiNodejsComponent, ...args: any[]) {

	const roles = await get_roles(fd.data.msg, fd.data.headers);
	const tb = roles as any[];
	const data = tb.map((v) => {
		return {
			...v, v: JSON.stringify(v)
		};
	});
	render(fd.data.node, data, P01, 'P01');

}
